<?php
namespace app\common\service\util;

use fast\Http;

/**
 * gitcode工具类
 */
class GitCode
{
    protected $enterprise;

    public function __construct($enterprise)
    {
        $this->enterprise = $enterprise;
        if(!$this->enterprise){
            return '请先选择企业';
        }

    }

    /**
     * 发送请求拉取代码
     */
    public function fetch()
    {
        $apiUrl = '192.168.1.100:100/api/GitCode/fetch';
        $res = Http::post($apiUrl);
        return $res;
    }
}